package cn.sharp.bbs.dao.score;

import cn.sharp.bbs.entity.BO.BillIn;
import cn.sharp.bbs.entity.BO.BillOut;
import cn.sharp.bbs.entity.DO.Bill;
import cn.sharp.bbs.entity.DO.Datadict;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @className: BillDao
 * @description: 积分收支账单Dao
 * @author: 王晓崧
 * @date: 2022/7/9
 **/
public interface BillDao {

    List<Bill> getInBill(Long u_id);

    List<Bill> getOutBill(Long u_id);

    @Select("select ddict_name from t_data_dict where ddict_type=#{type} and ddict_code=#{code}")
    String getNameByDict(Datadict datadict);

    @Select("select ddict_code from t_data_dict where ddict_type=#{type} and ddict_name=#{name}")
    int getCodeByDict(Datadict datadict);

    List<BillIn> getAllInBill(BillIn billIn);

    List<BillOut> getAllOuTBill(BillOut billOut);
}
